package com.hmy.finance.dal.po.json;

import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 损益信息
 *
 * @author songkf
 */
@Data
public class ProfitLossInfoJson implements Serializable {

    private static final long serialVersionUID = 687164721949502346L;

    /**
     * 业务单据类型
     * {@link com.hmy.finance.common.enums.BusinessBillTypeEnum}
     */
    private String businessBillType;

    /**
     * 损益类型
     * {@link com.hmy.finance.api.bo.core.request.enums.FeeTypeEnum}
     */
    private String type;
    /**
     * 损益类型描述
     */
    private String typeDesc;
    /**
     * 损益金额
     */
    private BigDecimal fee;
    /**
     * 损益记录ID
     */
    private Long recordId;
    /**
     * 损益明细ID
     */
    private Long detailId;

    /**
     * 获取ProfitLossInfoJson实例
     *
     * @param businessBillType 业务单据类型
     * @param type             损益类型
     * @param typeDesc         损益类型描述
     * @param fee              损益金额
     * @return ProfitLossInfoJson
     * @author songkf
     */
    public static ProfitLossInfoJson getInstance(String businessBillType, String type, String typeDesc, BigDecimal fee) {
        ProfitLossInfoJson profitLossInfoJson = new ProfitLossInfoJson();
        profitLossInfoJson.setBusinessBillType(businessBillType);
        profitLossInfoJson.setType(type);
        profitLossInfoJson.setTypeDesc(typeDesc);
        profitLossInfoJson.setFee(fee);
        return profitLossInfoJson;
    }

}
